<template>
	<view>
		<view class="card-box" v-if="vuex_user.member_status == 1">
			<view class="cb-top"><view class="oder-title">我的会员</view></view>
			<view class="cb-bottom">
				<image class="cbb-img" src="/static/icon/ic_47.png" mode=""></image>
				<view class="bottom-right">
					<view class="br-title">VIP会员</view>
					<view class="">{{ vuex_user.mobile }}</view>
					<view class="">到期时间：{{ vuex_user.expire_date | formatTime() }}</view>
					<view class="br-box">
						<view class="brb-title">NO.{{ vuex_user.pk_id }}</view>
						<view class="br-btn" @click="openVIP">会员续费</view>
					</view>
				</view>
			</view>
		</view>
		<view class="card" v-else @click="openVIP"><image class="card-img" src="http://klwl-file.oss-cn-shenzhen.aliyuncs.com/202203/199/55029241568402.png" mode="widthFix"></image></view>
	</view>
</template>

<script>
import { formatDate } from '@/utils/moment';
export default {
	components: {},
	data() {
		return {};
	},
	filters: {
		formatTime(val) {
			return formatDate(val, 'YYYY-MM-DD HH:mm:ss');
		}
	},
	mounted() {},

	methods: {
		openVIP() {
			this.$to('/package/user/my-vip/index');
		}
	}
};
</script>

<style scoped lang="scss">
.card {
	width: 100%;
	.card-img {
		width: 100%;
		border-radius: 10rpx;
	}
}
.card-box {
	background: #fff;
	border-radius: 8rpx;
}
.cb-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 26rpx;
	height: 90rpx;
	border-bottom: 1rpx solid #eaeaea;
	.oder-title {
		color: #333;
		font-size: 32rpx;
		font-weight: bold;
	}
}
.cb-bottom {
	display: flex;
	padding: 20rpx 26rpx;

	.cbb-img {
		width: 160rpx;
		height: 160rpx;
		border-radius: 10rpx;
		margin-right: 10rpx;
		border: 1px solid #f1f1f1;
	}

	.bottom-right {
		display: flex;
		flex-direction: column;
		padding: 10rpx 0;
		width: 73%;
		font-size: 24rpx;

		.br-title {
			font-size: 30rpx;
			font-weight: bold;
		}

		.br-box {
			display: flex;
			align-items: center;
			justify-content: space-between;
			font-size: 32rpx;
			padding-top: 10rpx;

			.brb-title {
				font-weight: bold;
			}

			.br-btn {
				width: 120rpx;
				height: 40rpx;
				border-radius: 10rpx;
				color: #fff;
				font-size: 22rpx;
				line-height: 40rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				background-color: var(--color);
			}
		}
	}
}
</style>
